package com.oms.service;

import java.sql.Timestamp;
import java.util.List;

import com.oms.domain.Acknowledgement;
import com.oms.domain.User;


public interface AcknowledgementService extends BaseService<Acknowledgement> {

	
	/**
	 * 获取未读信息数目
	 * @param receiver
	 * @return
	 */
	public Integer getUnReadMsgCount(User receiver);
	
	
	/**
	 * 根据时间段，获取收到的信息集合
	 * @param receiver
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	public List<Acknowledgement> getMessageList(User receiver,Timestamp startTime,Timestamp endTime);
	
	
	/**
	 * 根据时间段、条目范围，获取收到的信息集合
	 * @param receiver
	 * @param firstResult
	 * @param maxResults
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	public List<Acknowledgement> getMessageListWithPage(User receiver,Integer firstResult,Integer maxResults,Timestamp startTime,Timestamp endTime);
	

	/**
	 * 根据时间段、条目范围，获取收到的未读信息集合
	 * @param receiver
	 * @param firstResult
	 * @param maxResults
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	public List<Acknowledgement> getUnReadMsgListWithPage(User receiver,Integer firstResult,Integer maxResults,Timestamp startTime,Timestamp endTime);
	
	/**
	 * 根据时间段、条目范围，获取收到的已读信息集合
	 * @param receiver
	 * @param firstResult
	 * @param maxResults
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	public List<Acknowledgement> getReadedMsgListWithPage(User receiver,Integer firstResult,Integer maxResults,Timestamp startTime,Timestamp endTime);
	
	/**
	 * 删除一条消息
	 * @param id
	 * @param user
	 */
	public void deleteMsg(Integer id, User user);
	
	
	/**
	 * 接收者阅读信息
	 * @param id
	 * @param user
	 * @return
	 */
	public Acknowledgement receiverReadMsg(Integer id ,User user);

}
